package com.order_system.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author 李阳
 * @since 2023-01-06
 */
@Data
@TableName(value = "order_list",autoResultMap = true)
public class OrderList {
    private Integer orderId;
    private Integer customerId;
    private Double totalPrice;
    private Integer modeId;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8"
    )
    private Date orderTime;

    @TableField(exist = false)
    private List<Product> product;

    @TableField(exist = false)
    private PayMode payMode;
}
